File Manager

Introduction

The File Manager is the part of the Mac OS that manages the organization, reading, and writing of data located on physical data storage devices such as disk drives. This data includes the data in documents as well as other collections of data used to maintain the hierarchical file system and other system software services. To accomplish these tasks, the File Manager interacts with many other components of the system software. For example, the Resource Manager uses File Manager routines when it needs to read and write resource data. Similarly, the File Manager calls the Device Manager to perform the actual reading and writing of data on a physical data storage device. In general, you’ll use the Resource Manager to read and write data in a file’s resource fork and the File Manager to read and write data in a file’s data fork. You’ll also use the File Manager to perform operations on directories and volumes.

The File Manager provides a large number of routines for performing various operations on files, directories, and volumes. The requirements of your application will dictate which of these routines you will need to use. Many applications simply need to open files, read and write the data in those files, and then close the files. Other applications might provide more capabilities, such as the ability to copy a file or move a file to another directory. A few file-system utilities perform even more extensive file operations and hence need to use some of the advanced routines provided by the File Manager. For example, a disk scavenger might need to make a byte-by-byte search through a volume to find pieces of a deleted file.